#pragma once
#pragma warning(disable : 4996)

#ifndef __CGymClub_H
#define __CGymClub_H

#include "CTrainer.h"
#include "CDevice.h"
#include <string.h>

const int MAXTRAINERS=100;

typedef enum resType {REGISTER_OK,REGISTER_FAIL_CLUB_FULL} resAddTrainer;

	class CGymClub
{
public:
	//------------------------C'tor,D'tor---------------------------

	CGymClub(const char *name);
	CGymClub(const  CGymClub &other);
	~CGymClub(void);
	//--------------------------------------------------------------

	//-------------------------Getters------------------------------
	CTrainer * getTrainerbyName (const char * TrainerName);
	CDevice  * getDevicebyName  (const char * DeviceName);
	
	const char * getClubName    ();
	void      getGymDevices  (char ** &Arr);
	void      getGymTrainers (char ** &Arr);
	
	const CDevice * getDevice      (const int ind);
	const CTrainer *getTrainer     (const int ind);
	
	int getDeviceCount      () const ;
	int getTrainerCount     () const ;
	//--------------------------------------------------------------
	
	//-------------------------Setters------------------------------
	resAddTrainer addTrainer(const char *TrainerName); 
	void addDevice			(const char *DeviceName);  

	void freeAll();
	void freeStrings(char **&Arr,int len);
	//--------------------------------------------------------------

private:
	char ClubName[20];


	CTrainer *Trainers[MAXTRAINERS];
	int TrainersCount;

	CDevice **Devices;
	int DevicesCount;

};

#endif
